using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cysharp.Threading.Tasks;

[RequireComponent(typeof(PlayerInput))]
public class UIManager : MonoBehaviour
{
    public static UIManager Instance;

    public PlayerInput PlayerInput;
    private void Awake()
    {
        if(Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);

            return;
        }

        DontDestroyOnLoad(gameObject);

        PlayerInput = GetComponent<PlayerInput>();

        PanelManager.Instance.CreateUIPanel(new AudioBackgroundPanel(), transform).Forget();
    }
}
